#ifndef __H_MY_DEF_H__
#define __H_MY_DEF_H__

#include "cmd.h"
#include "Packet.h"
#include "globalDefine.h"
#include "NodeDefine.h"
#include <string>
#include <vector>
#include <map>


typedef struct _ProviderItem
{
	_ProviderItem()
	{
		service_name = "";
		alloc_type = ALLOC_RANDOM;
		active_count = 1;
		switch_time = 0;
	}
	std::string service_name;
	int server_type;
	int alloc_type;
	int active_count;
	int switch_time;
}ProviderItem;
typedef std::map<int, ProviderItem*> ProviderConfList;

typedef std::vector<ServerData*>   ProviderVect;
typedef std::map<int, ProviderVect> ProviderTypeList;

typedef std::map<int, ServerData*> ProviderMap;
typedef std::map<int, ProviderMap> ProviderMapTypeList;

typedef struct _RequestorItem
{
	_RequestorItem()
	{
		requestor_name = "";
		server_type = 0;
		request_service_str = "";
	}
	std::string requestor_name;
	int server_type;
	std::string request_service_str;
	std::vector<int> reqServicItems;
}RequestorItem;
typedef std::map<int, RequestorItem*> RequestorConfList;
typedef std::vector<ServerData*>  RequestorVect;
typedef std::map<int, RequestorVect> RequestorTypeList;

typedef struct  _SMItem
{
	int svid;
	int score;
}SMITem;
typedef std::vector<SMITem>  SMVect;
typedef std::map<int, SMITem>  SMList;



#endif